﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Screenshot2Disk
{
    public partial class OutputForm : Form
    {
        public OutputForm(string path, IEnumerable<ClipboardFormat> formats)
        {
            InitializeComponent();

            this.Formats = formats;
            this.Path = path;

            this.outputFormatsBox.DataSource = this.Formats;
        }

        public string Path { get; set; }
        public IEnumerable<ClipboardFormat> Formats { get; set; }

        private void pasteButton_Click(object sender, EventArgs e)
        {
            var selected = this.outputFormatsBox.SelectedItem as ClipboardFormat;
            ClipboardHelper.Handle(this.Path, selected);

            Application.Exit();
        }
    }
}
